package com.wnhz.work.yz.view;


import android.content.Context;
import android.util.AttributeSet;
import android.widget.ToggleButton;

import com.wnhz.work.yz.R;

public class TagView extends ToggleButton {
	
	private boolean mSelectedEnable = true;

	public TagView(Context paramContext) {
		super(paramContext);
		init();
	}

	public TagView(Context paramContext, AttributeSet paramAttributeSet) {
		super(paramContext, paramAttributeSet);
		init();
	}

	public TagView(Context paramContext, AttributeSet paramAttributeSet,
			int paramInt) {
		super(paramContext, paramAttributeSet, 0);
		init();
	}

	private void init() {
		setTextOn(null);
		setTextOff(null);
		setText("");
		setBackgroundResource(R.drawable.tag_bg);
	}

	public void setSelectEnable(boolean paramBoolean) {
		this.mSelectedEnable = paramBoolean;
		if (!this.mSelectedEnable) {
			super.setSelected(false);
		}
	}

	public void setSelected(boolean paramBoolean) {
		if (this.mSelectedEnable) {
			super.setSelected(paramBoolean);
		}
	}
}
